package com.cjl.demo.data.structure;

/**
 * 判断字符串中最大回文字符
 */
public class Huiwen {

    public static void main(String[] args) {
        boolean result = isHuiwen("12");
        System.out.println("result = " + result);
    }
    private static boolean isHuiwen(String s){
        if(s.length() <= 1){
            return true;
        }
        for(int i = 0; i < s.length()/2; i++){
            if(s.charAt(i) == s.charAt(s.length()-1 -i)){
                return false;
            }
        }
        return true;
    }
}
